﻿<script id="projects_milestoneTemplate" type="text/x-jquery-tmpl">
    <tr id="${id}" class="with-entity-menu ${status} with-checkbox">
    <td class="checkbox">
        <input type="checkbox"/>
    </td>
    <td class="status">
        {{tmpl({canEdit: $item.data.canEdit, status: ASC.Projects.StatusList.getById($item.data.status)}) 'projects_statusChangeContainer'}}
    </td>
    <td class="title stretch">
        {{if isKey == true}}
            <span class="key" title="${ASC.Projects.Resources.MilestoneResource.RootMilestone}"></span>
        {{/if}}
        <a href="javascript:void(0)" class="linkHeaderMedium {{if $item.data.status === 1}} gray-text{{/if}}">${title}</a>
    </td>
    <td class="activeTasksCount">
        {{if activeTasksCount != 0 || closedTasksCount != 0}}
            {{if status !== 1}}
                <a href="${activeTasksLink}" title="${ASC.Projects.Resources.ProjectResource.TitleMilestoneOpenTasks}">${activeTasksCount}</a>
            {{else}}
                ${activeTasksCount}
            {{/if}}
        {{/if}}
    </td>
    <td class="slash">
        {{if activeTasksCount != 0 || closedTasksCount != 0}}
            /
        {{/if}}
    </td>
    <td class="closedTasksCount">
        {{if activeTasksCount != 0 || closedTasksCount != 0}}
            {{if status !== 1}}
                <a href="${closedTasksLink}" title="${ASC.Projects.Resources.ProjectResource.TitleMilestoneClosedTasks}">${closedTasksCount}</a>
            {{else}}
                ${closedTasksCount}
            {{/if}}
        {{/if}}
    </td>
    <td class="deadline">
        {{if overdue }}
            <span class="overdue">${deadline}</span>
        {{else}}
            <span>${deadline}</span>
        {{/if}}
    </td>
    <td class="responsible">
        <div>
            <span {{if responsibleId=='4a515a15-d4d6-4b8e-828e-e0586f18f3a3' || (isTerminated && !Teamlab.profile.isAdmin)}} class="not-action"{{/if}} title="${ASC.Projects.Resources.ProjectResource.TitleMilestoneResponsibleUser}">${responsible}</span>
        </div>
    </td>
    <td class="actions">
        {{if (canEdit && !Teamlab.profile.isVisitor) || canDelete}}
            <div class="entity-menu" title="${ASC.Projects.Resources.ProjectsCommonResource.Actions}"></div>
        {{/if}}
    </td>
</tr>
</script>

